package cn.shangqizhenshuai.sqiot.entity;

import java.io.Serializable;
import java.util.Date;

public class HiValue implements Serializable {
    private Integer id;

    private String sqiotTopic;

    private Double sqiotValue;

    private Date sqiotDatatime;

    private Integer eid;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getSqiotTopic() {
        return sqiotTopic;
    }

    public void setSqiotTopic(String sqiotTopic) {
        this.sqiotTopic = sqiotTopic == null ? null : sqiotTopic.trim();
    }

    public Double getSqiotValue() {
        return sqiotValue;
    }

    public void setSqiotValue(Double sqiotValue) {
        this.sqiotValue = sqiotValue;
    }

    public Date getSqiotDatatime() {
        return sqiotDatatime;
    }

    public void setSqiotDatatime(Date sqiotDatatime) {
        this.sqiotDatatime = sqiotDatatime;
    }

    public Integer getEid() {
        return eid;
    }

    public void setEid(Integer eid) {
        this.eid = eid;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        HiValue other = (HiValue) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getSqiotTopic() == null ? other.getSqiotTopic() == null : this.getSqiotTopic().equals(other.getSqiotTopic()))
            && (this.getSqiotValue() == null ? other.getSqiotValue() == null : this.getSqiotValue().equals(other.getSqiotValue()))
            && (this.getSqiotDatatime() == null ? other.getSqiotDatatime() == null : this.getSqiotDatatime().equals(other.getSqiotDatatime()))
            && (this.getEid() == null ? other.getEid() == null : this.getEid().equals(other.getEid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getSqiotTopic() == null) ? 0 : getSqiotTopic().hashCode());
        result = prime * result + ((getSqiotValue() == null) ? 0 : getSqiotValue().hashCode());
        result = prime * result + ((getSqiotDatatime() == null) ? 0 : getSqiotDatatime().hashCode());
        result = prime * result + ((getEid() == null) ? 0 : getEid().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", sqiotTopic=").append(sqiotTopic);
        sb.append(", sqiotValue=").append(sqiotValue);
        sb.append(", sqiotDatatime=").append(sqiotDatatime);
        sb.append(", eid=").append(eid);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}